﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using Javavaj.iHunter;

namespace Javavaj.iHunter.Core
{
    /// <summary>
    /// 插件配置更改事件的参数
    /// </summary>
    public class PluginSettingChangedEventArgs : EventArgs
    {
        private XmlDocument settings;

        private IPlugin plugin;
        /// <summary>
        /// 发生改变的插件
        /// </summary>
        public IPlugin Plugin
        {
            get { 
                return plugin; 
            }
        }

        /// <summary>
        /// 获取用来表示频道设置的Xml文档对象
        /// </summary>
        public XmlDocument Settings
        {
            get
            {
                return settings;
            }
        }
        /// <summary>
        /// 使用指定的Xml文档对象创建PluginSettingChangedEventArgs的实例
        /// </summary>
        /// <param name="settings">用来表示频道设置的Xml文档对象</param>
        public PluginSettingChangedEventArgs(IPlugin plugin, XmlDocument settings)
            : base()
        {
            this.plugin = plugin;
            this.settings = settings;
        }

    }
    /// <summary>
    /// 插件配置更改事件处理程序
    /// </summary>
    /// <param name="sender">事件发送者</param>
    /// <param name="e">代表更改内容的PluginSettingChangedEventArgs对象</param>
    public delegate void PluginSettingChangedEventHandler(object sender, PluginSettingChangedEventArgs e);


}
